package cn.sdormitory.index.dao;

import cn.sdormitory.school.entity.SchoolDuty;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Mapper
@Component
public interface IndexDataDao {

    /**
     * 查询各个宿舍前一天出勤情况
     * @param lastDay
     * @return
     */
    List<Map<String,Object>> findLastDaySdAttenceData(@Param("lastDay") String lastDay);

    /**
     * 查询班级近一周的请假数据
     * @param classId
     * @return
     */
    List<Map<String, Object>> findNearWeekLeaveDataByClassId(@Param("classId")Long classId);

    Map<String, Object> findSdRepairCount();

    Map<String, Object> findClassRepairCount();

    List<SchoolDuty> findTodayDutyPerson(@Param("today")String today);

    List<Map<String, Object>> findTodayClassAttenceData(@Param("today")String today);

    List<Map<String, Object>> findDvCount();
}
